package com.feinno.urcs.group.main;

import com.feinno.urcs.mobile.UserLocatorService;
import com.feinno.urcs.mobile.entity.UserLocation;
import com.feinno.urcs.mobile.entity.UserType;
import com.feinno.urcs.types.MobileNo;
import org.helium.framework.annotations.ServiceImplementation;

import javax.sip.address.URI;

/**
 * @author Li.Hongbo <lihongbo@feinno.com>
 */

@ServiceImplementation
public class UserLocatorServiceMock implements UserLocatorService {
	@Override
	public UserLocation lookup(URI uri) {
		throw new RuntimeException("un IMPL ");
//		return null;
	}

	@Override
	public UserLocation lookup(MobileNo mobileNo) {
		String mobile = mobileNo.getMobile();
		if (mobile.contains("1600000069") || mobile.contains("15062283197") || mobile.contains("15062283198") || mobile.contains("15062283199")) {
			return new UserLocation(UserType.OUTER);
		}
		return new UserLocation(UserType.INNER);
	}
}
